package com.junzhiit.nengji.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum FullReductionStatus {

	NOTSTARTED(0),
	STARTED(1),
	FINISHED(2);
	
	private Integer value;
	
	private FullReductionStatus(Integer value){
		this.value = value;
	}

	public int toIntValue() {
		return this.value;
	}

	public static FullReductionStatus toValue(int value) {
		if (NOTSTARTED.value == value) {
			return NOTSTARTED;
		} else if (STARTED.value == value) {
			return STARTED;
		} else if (FINISHED.value == value) {
			return FINISHED;
		} else {
			throw new InvalidArgumentException("Unknown is[" + value + "].");
		}
	}
	
}
